//
//  ReloadView.m
//  ios_news
//
//  Created by Han on 14-6-21.
//  Copyright (c) 2014年 ucoder. All rights reserved.
//

#import "ReloadView.h"

@implementation ReloadView


- (id)initWithFrame:(CGRect)frame RootViewController:(id)rootViewCtr
{
    if (self == [self initWithFrame:frame]) {
        self.mRootViewCtr = rootViewCtr;
        //self.backgroundColor = [UIColor redColor];
        [self drawView];
    }
    return self;
}


- (void) drawView
{
    UIControl *control = [[UIControl alloc]initWithFrame:self.bounds];
    [control addTarget:self action:@selector(selfTapped:) forControlEvents:UIControlEventTouchUpInside];
    //_control = control;
    [self addSubview:control];

    UIImageView *reloadImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 150, 100)];
    
    reloadImageView.image = [UIImage imageNamed:@"reload"];
    
    reloadImageView.center = self.center;
    [self addSubview:reloadImageView];

}


- (void)selfTapped:(id)sender
{
    [self.mRootViewCtr performSelector:@selector(loadData) withObject:nil];
}

@end
